package product.jbpmDesign;

import org.apache.commons.lang.math.NumberUtils;
/**
 *类描述:
 *@作者 hjl
 *@日期:2012-10-8 时间:下午03:22:47
 *@功能:用于将xml转成对应的json
 */
public class Coordinate {
	private int x,y;

	public int getX() {
		return x;
	}

	public void setX(int x) {
		this.x = x;
	}

	public int getY() {
		return y;
	}

	public void setY(int y) {
		this.y = y;
	}

	public void doSplit(String gStr){
		String[] array = gStr.split(",");
		this.x = NumberUtils.toInt(array[0],0);
		this.y = NumberUtils.toInt(array[1],0);
	}

	@Override
	public String toString() {
		String result="";
		if(x==0 && y==0)
			result="";
		else
			result="x="+x+",y="+y;
		return result;
	}
	
}
